Skip to content

[test] Fix race condition in watcher disable test#1563

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:fix_watcher_test
Aug 14, 2025
Merged

[test] Fix race condition in watcher disable test#1563
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:fix_watcher_test

Conversation

@stuggi

@stuggi stuggi commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

Wrap OpenStackControlPlane spec update in Eventually block to handle potential conflicts from concurrent updates.

Fixes HTTP 409 conflict error: 'the object has been modified; please apply your changes to the latest version and try again' randomly seen in running the functional test.

Wrap OpenStackControlPlane spec update in Eventually block to handle
potential conflicts from concurrent updates.

Fixes HTTP 409 conflict error: 'the object has been modified; please
apply your changes to the latest version and try again' randomly seen
in running the functional test.

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@openshift-ci

openshift-ci Bot commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stuggi

stuggi commented Aug 14, 2025

Copy link
Copy Markdown
Contributor Author

seen in local run:

5-453b-b192-e3a827f63c6f", "name": "7f305d9e-bfe6-4bda-b7b8-c", "reconcileID": "5adfcdb5-8771-4330-998b-74b1b9203df5"}
  2025-08-14T10:37:36.860+0200	INFO	---CtlPlane Test---	Deleted	{"Name": "7f305d9e-bfe6-4bda-b7b8-c", "Namespace": "13829583-9bb5-453b-b192-e3a827f63c6f", "Kind": "OpenStackControlPlane"}
  << Timeline

  [FAILED] Expected success, but got an error:
      <*errors.StatusError | 0xc000ad0280>: 
      Operation cannot be fulfilled on openstackcontrolplanes.core.openstack.org "7f305d9e-bfe6-4bda-b7b8-c": the object has been modified; please apply your changes to the latest version and try again
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "Operation cannot be fulfilled on openstackcontrolplanes.core.openstack.org \"7f305d9e-bfe6-4bda-b7b8-c\": the object has been modified; please apply your changes to the latest version and try again",
              Reason: "Conflict",
              Details: {
                  Name: "7f305d9e-bfe6-4bda-b7b8-c",
                  Group: "core.openstack.org",
                  Kind: "openstackcontrolplanes",
                  UID: "",
                  Causes: nil,
                  RetryAfterSeconds: 0,
              },
              Code: 409,
          },
      }
  In [It] at: /home/mschuppe/src/github.com/openstack-k8s-operators/openstack-operator/tests/functional/ctlplane/openstackoperator_controller_test.go:2262 @ 08/14/25 10:37:36.638

  Full Stack Trace
    github.com/openstack-k8s-operators/openstack-operator/tests/functional/ctlplane_test.init.func2.35.6()
    	/home/mschuppe/src/github.com/openstack-k8s-operators/openstack-operator/tests/functional/ctlplane/openstackoperator_controller_test.go:2262 +0x119

@stuggi stuggi requested review from abays and removed request for lewisdenny August 14, 2025 08:53
@karelyatin

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 14, 2025
@openshift-merge-bot openshift-merge-bot Bot merged commit fa9299f into openstack-k8s-operators:main Aug 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants